<!DOCTYPE html>
<html lang="en" style="font-size: 37.5px">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <style>
        *{margin:0;padding:0}
        #banner{
            width: 8.933rem;
            height: 3.84rem;
            margin: 2.587rem auto;
            background: rgb(81, 161, 184);
        }
    </style>
</head>
<body>
    <div id="banner"></div>

    <script>
        function adapter(){
            //计算当前设备对应的根标签大小
            let fontSize = document.documentElement.clientWidth / 10;
            //设置根标签大小
            document.documentElement.style.fontSize = fontSize + 'px';
        }

        adapter();

        window.onresize = adapter;

    </script>
</body>
</html>